/// Creator:      fengliang
/// CreatDate:    2021-03-12
/// Description:  工作统计类型表
Class CF.NUR.MNISV3.IPIFWorkType Extends %Persistent
{

/// 操作类型CODE
Property WorkTypeCode As %String(TRUNCATE = 1);

/// 操作类型描述
Property WorkTypeDesc As %String(TRUNCATE = 1);

/// Creator:        fengliang
/// CreatDate:      2021-03-12
/// Description:    保存
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Despensing^配液^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("AuditDes^复核^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Puncture^穿刺^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Change^续液^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Tour^巡视^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Suspend^暂停^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Continue^继续^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Stop^停止^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("Finish^拔针^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("AutoFinish^续液完成^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("PutOrd^摆药^")
/// Method          w ##class(CF.NUR.MNISV3.IPIFWorkType).Save("JPRec^接收^")
ClassMethod Save(parr As %String) As %String
{
    s workTypeCode=$p(parr,"^",1)
    s workTypeDesc=$p(parr,"^",2)
    s id=$p(parr,"^",3)
    i id=""{
        s obj=##class(CF.NUR.MNISV3.IPIFWorkType).%New()
    }
    else
    {
        s obj=##class(CF.NUR.MNISV3.IPIFWorkType).%OpenId(modelId)
    }
    
    s obj.WorkTypeCode=workTypeCode
    s obj.WorkTypeDesc=workTypeDesc
    d obj.%Save()
    d obj.%Close()

    q ""
}

Storage Default
{
<Data name="IPIFWorkTypeDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>WorkTypeCode</Value>
</Value>
<Value name="3">
<Value>WorkTypeDesc</Value>
</Value>
</Data>
<DataLocation>^CF.NUR.MNISV3.IPIFWorkTypeD</DataLocation>
<DefaultData>IPIFWorkTypeDefaultData</DefaultData>
<IdLocation>^CF.NUR.MNISV3.IPIFWorkTypeD</IdLocation>
<IndexLocation>^CF.NUR.MNISV3.IPIFWorkTypeI</IndexLocation>
<StreamLocation>^CF.NUR.MNISV3.IPIFWorkTypeS</StreamLocation>
<Type>%Storage.Persistent</Type>
}

}
